<extend name="./Component/_master" />
<block name="style">
</block>
<block name="body">

<div class="col-xs-12">
  
<div class="animated fadeInUp">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h4 class="text-danger">
                <i class="fa fa-flag"></i>&nbsp;等级详情
                <include file="./Component/_return" />
            </h4>
        </div>
        <div class="panel-body">
            <form data-validation="true" method="POST" action="{:U('Level/detail')}"> 
                <if condition="$error neq ''">
                    <div class="alert alert-danger">
                        {$error}
                    </div>
                </if>
                <input type="hidden" id="id" name="id" value="{$levelInfo.id}"/>
                <div class="form-group">
                    <label for="">等级名称</label>
                    <input type="text" value="{$levelInfo.name}" check-type="required" required-message="请输入等级名称" class="form-control" id="name" name="name" placeholder="请输入等级名称...">
                </div>
                <div class="form-group">
                    <label for="">
                      等级图标&nbsp;
                      <a href="{:U('Image/index')}" target="_blank" class="text-danger">
                        <i class="fa fa-arrow-circle-right"></i>&nbsp;点击进入图片上传服务
                      </a>
                    </label>
                    <input type="text" class="form-control" value="{$levelInfo.pic}" id="pic" name="pic" check-type="required" required-message="请录入等级图标" placeholder="请录入等级图标...">
                    <p class="help-block">
                      注：请粘贴网络图片地址。此图标将在前端进行展示
                    </p>
                </div>
                <div class="form-group">
                    <label for="">
                      积分范围
                    </label>
                    
                    <div class="list-group-item">
                        <div class="rangeSelector" id="point-selector"
                          data-type="double"
                          data-disable="false" 
                          data-max="{$Think.config.LEVEL_MAX_POINT}"
                          data-min="-0"
                          data-step="10"
                          data-grid="true"
                          data-postfix="分"
                          data-from="{$levelInfo.point_begin|default=100}" 
                          data-to="{$levelInfo.point_end|default=500}"></div>
                      </div>
                      <span class="help-block">注：会员等级确认公式为：等级下限积分 <= 会员积分 < 等级上限积分 </span>
                      <input type="hidden" value="{$levelInfo.point_begin|default=100}" id="point-selector-from" name="point_begin">
                      <input type="hidden" value="{$levelInfo.point_end|default=500}" id="point-selector-to" name="point_end">
                </div>
                <div class="form-group">
                    <label for="">备注信息</label>
                    <textarea class="form-control" id="descr" name="descr" placeholder="请输入等级描述..." rows="3">{$levelInfo.descr}</textarea>
                </div>
        
                <button type="submit" class="btn btn-success btn-submit">修改</button>
            </form>
        </div>
    </div>
</div>

</div>
</block>
<block name="script">
</block>